package com.larry.resend.motion.am;

import java.util.ArrayList;
import java.util.List;

import com.pegatron.ers.server.app.helper.ContextHelper;
import com.pegatron.ers.vo.common.CommonDataModel;

public class R02PEGCMPCSProcessor extends MotionCommonProcessor {

	public R02PEGCMPCSProcessor() {
		super("ShipService", "submitExpressShip", "com.pegatron.ers.server.app.message.edi.motion.MotionEdiCMPCSSender", "com.pegatron.ers.jms.edi.motion.executor.MotionEdiR02CMPCSMessageConsumer");
	}

	@Override
	public void process(String key) throws Exception {
		super.caseNumber = key;
		this.sendMessage();
	}

	@Override
	public void initData() {

	}

	@Override
	public void prepareParams() throws Exception {
		initParams = new ArrayList<Object>();
		List<CommonDataModel> infos = ContextHelper.getMotionEdiService().getEdiMotionHeaderInfo(caseNumber, null, null, null, null, rmaSite);
		initParams.add(rmaSite);
		initParams.add(null);
		initParams.add(((CommonDataModel) infos.get(0)).getBigDecimal("order_no"));
	}
}
